<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>天气管理</title>
<!--导入各种支持  -->
<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath}/static/jquery-easyui-1.3.3/themes/default/easyui.css">
<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath}/static/jquery-easyui-1.3.3/themes/icon.css">
<script type="text/javascript"
	src="${pageContext.request.contextPath}/static/jquery-easyui-1.3.3/jquery.min.js"></script>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/static/jquery-easyui-1.3.3/jquery.easyui.min.js"></script>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/static/jquery-easyui-1.3.3/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript">
	function searchWeather() {
		$("#dg").datagrid('load', {

			"name" : $("#sname").val()

		});
	}

	function xiangxi() {

		$('#big').css('display', 'block');
		$.ajax({
			type : "POST",//规定传输方式
			url : "${pageContext.request.contextPath}/weather/weather.do",//提交URL
			success : function(data) {

				$("#big").html(data);//交互成功回调
			}
		});

	}

	function close() {
		$('#big').css('display', 'none');
	}
</script>
<body>
	<div id="big"
		style="width: auto; height: 400px; overflow: scroll; display: none;"></div>

	<div>

		<a href="javascript:xiangxi()" class="easyui-linkbutton"
			iconCls="icon-search">查看天气实况详细</a> <a href="javascript:close()"
			class="easyui-linkbutton" iconCls="icon-search">关闭天气实况详细</a>
	</div>
	<iframe width="420" scrolling="no" height="60" frameborder="0"
		allowtransparency="true"
		src="http://i.tianqi.com/index.php?c=code&id=12&icon=5&py=hangzhou&num=5&site=12"></iframe>

	<table id="dg" title="天气记录查询" class="easyui-datagrid"
		style="width: auto; height: 200px;" fitColumns="true"
		pagination="true" rownumbers="true"
		url="${pageContext.request.contextPath}/weather/list.do?"
		toolbar="#tb" fit="true">
		<thead>
			<tr>
				<th field="num" width="20" align="center">记录编号</th>
				<th field="date" width="20" align="center">日期</th>
				<th field="temperature" width="20" align="center">温度</th>
				<th field="humidity" width="20" align="center">湿度</th>
				<th field="name" width="20" align="center">天气概括</th>
			</tr>
		</thead>
	</table>


	<div id="tb">

		<div>
			&nbsp;天气概况关键字&nbsp;<input type="text" id="sname" size="20"
				onkeydown="if(event.keyCode==13) searchBlog()" /> <a
				href="javascript:searchWeather()" class="easyui-linkbutton"
				iconCls="icon-search" plain="true">搜索</a>





		</div>

	</div>


</body>
</html>